<template>
    <a-card :bordered="false" >
        <a-table bordered :columns="columns" :data-source="dataSource">
            <template slot="action">
                <a> 编辑</a>
                <a style="margin-left: 10px;"> 删除</a>
            </template>
        </a-table>
<!--        <a-button @click="shit">123</a-button>-->
    </a-card>
</template>

<script>
    import {mapMutations} from "vuex";

    export default {
        name: "role",
        data(){
            return {
                dataSource:[
                    {name:"管理员", desc:"用于管理系统日常事务", key: '0'},
                    {name:"数据维护员", desc:"用于维护数据", key: '1'},
                    {name:"数据查询员", desc:"用于查询数据", key: '2'},
                ],
                columns:[
                    {title:"角色名", dataIndex:"name", key: "name", width: "20%"},
                    {title:"角色描述", dataIndex:"desc", key: "desc", width: "50%"},
                    {title:"操作", dataIndex:"action", key: "action", width: "20%", scopedSlots: {customRender:"action"}},
                ]
            }
        },
        methods:{
            ...mapMutations("test", ["setTest"]),
            shit(){
                console.log("shit click")
                this.setTest("system-user-list")
            }
        }
    }
</script>

<style scoped>

</style>